package cn.lingyangwl.agile.auth.model.rqrs.ldp;

import cn.lingyangwl.agile.auth.model.entity.ExtLdpConnect;
import cn.lingyangwl.agile.model.constants.ValidationCons;
import cn.lingyangwl.agile.model.module.auth.GrantTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 身份源连接模板
 * @see ExtLdpConnect
 * @author shenguangyang
 */
@Getter
@Setter
public class ExtLdpConnectBase {
    @ApiModelProperty(value = "名称")
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    private String name;

    /**
     * @see GrantTypeEnum
     */
    @ApiModelProperty(value = "授权方式")
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    private String grantType;

    @ApiModelProperty(value = "图标")
    private String logo;

    @ApiModelProperty(value = "是否隐藏")
    private Boolean isHidden;

    @ApiModelProperty(value = "标识")
    private String code;

    @ApiModelProperty(value = "外部身份源id")
    @NotNull(message = ValidationCons.NOT_EMPTY)
    private Long ldpId;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "是否询问绑定, 如果为false, 若没有绑定任何账号, 则自动创建新账号并进行绑定")
    private Boolean isAskBind;

    @ApiModelProperty(value = "显示名称")
    private String displayName;

    @ApiModelProperty(value = "配置key")
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    private String configKey;
}
